﻿using Cl.Entity.BaseEntity;
using Cl.Entity.DataBaseEntity.Goods;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Cl.Entity.DataBaseEntity.Orders
{
    [SugarTable("Order_GoodsOrder")]
    public class GoodsOrder : EntityBaseComplete
    {
        public string OrderCode { get; set; }

        /// <summary>
        /// 类似商品的名称组合之类的
        /// </summary>
        public string OrderName { get; set; }

        public int ShopId { get; set; }

        public string ShopName { get; set; }


        public string Community { get; set; }

        public string Avatar { get; set; }

        public decimal Total { get; set; }

        /// <summary>
        /// 订单状态 [1已取消，2待支付，3待收货，4待评价，5完成，6退款中，7退款完成]
        /// </summary>
        public int Status { get; set; }

        public string UserName { get; set; }

        public string UserPhone { get; set; }

        public string UserAddress { get; set; }

        /// <summary>
        /// 下单过期时间
        /// </summary>
        public DateTime ExpirationData { get; set; }


        public string? PayType { get; set; }
        public DateTime? PayTime { get; set; }
        public string? PayNo { get; set; }


        [Navigate(NavigateType.OneToMany, nameof(GoodsOrderRelatedGoods.OrderId))]
        public List<GoodsOrderRelatedGoods>? OrderRelatedGoodsList { get; set; }
    }
}
